home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
KST.TAS
< prev
next >
Wrap
Text File
|
1992-02-09
|
2KB
|
91 lines
{Martin below is KST script we've talked about. I think you or your }
{customers may find it interesting. David S. Landry, *P* MMMJ96A }
{ This script displays three KST indicators: the short, immed., and long }
{ The "Know Sure Thing" was developed by Martin Pring. It takes 4 rate }
{ of changes smoothes and weights them for the time period then sums them }
{ up. You can change the values of R1..R4 to get different time periods. }
{ Buy when the KST rises above the trigger and sell when it falls below. }
{ Use the three time periods to help you make your decision. Also, strong}
{ buy signals are given when the KST falls below zero then rises above }
{ zero.}
{Below is a "beta" version......I feel it can still use further }
{documentation and improvements...it requires TAS 4.08 w/ Graph feature }
#MAX_QUOTES 200
{}
{ Define arrays to be used: }
kst : ARRAY;
kst1 : array;
kst2 : array;
kst3 : array;
roc1 : array;
roc2 : array;
roc3 : array;
roc4 : array;
maroc1 : array;
maroc2 : array;
maroc3 : array;
maroc4 : array;
temp1 : array;
temp2 : array;
{Values for a short term KST:}
r1 = 3;
r2 = 5;
r3 = 7;
r4 = 10;
gosub calckst;
kst1 = kst;
{Values for a immed. KST:}
r1= 10;
r2= 15;
r3= 20;
r4 = 30;
gosub calckst;
kst2 = kst;
{Values for a long term KST:}
r1 = 40;
r2 = 60;
r3 = 80;
r4 = 100;
gosub calckst;
kst3= kst;
gosub graphit;
end;
:calckst
if QUOTE_COUNT > 100 THEN
BEGIN
{calculate ROC }
roc1=ROC(c,r1,'%');
roc2=ROC(C,r2,'%');
roc3=ROC(C,r3,'%');
roc4=ROC(C,r4,'%');
{calculate MA on each array}
maroc1=mov(roc1,10,'e');
maroc2=mov(roc2,10,'e');
maroc3=mov(roc3,10,'e');
maroc4=mov(roc4,10,'e');
{weight each array}
mulby(maroc1,1); {redundant statement, used for clarity}
mulby(maroc2,2);
mulby(maroc3,3);
mulby(maroc4,4);
{sum up all the arrays}
temp1 = ADD(maroc1,maroc2);
temp2 = add(maroc3,maroc4);
kst = add(temp1,temp2);
end;
return;
{}
:graphit
{Graph the three KSTs and display a 10 day MA "trigger"}
{You may want to experiment withe the trigger on the individual}
{KSTs}
OPENGRAPH(4);
sizegraph(1,1,1,2);
graph(kst1,'Short KST',mov(kst1,10,'e'),'10day MA');
graph(kst2,'Immed KST',mov(kst2,10,'e'),'10day MA');
graph(kst3,'Long KST',mov(kst3,10,'e'),'10day MA');
graph(1);
closegraph();
return;